﻿// Decompiled with JetBrains decompiler
// Type: Template.Type
// Assembly: Template, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: A1AE1EF6-30A0-49FB-9D2D-B42DD776AA13
// Assembly location: C:\Users\KasimGulcan\Desktop\Kosgeb\DynaCAD\Project\DynaCAD\bin\Debug\Template.dll

using System;
using System.Collections.Generic;

namespace Template
{
  [Serializable]
  public class Type
  {
    public string PartType;
    public List<PartPoint> FrontLeftPoints;
    public List<PartPoint> BackLeftPoints;
    public List<PartPoint> FrontRightPoints;
    public List<PartPoint> BackRightPoints;
    private bool _FrontBack;
    private bool _LeftRight;

    public bool FrontBack
    {
      get
      {
        return this._FrontBack;
      }
      set
      {
        this._FrontBack = value;
        int num = value ? 1 : 0;
      }
    }

    public bool LeftRight
    {
      get
      {
        return this._LeftRight;
      }
      set
      {
        this._LeftRight = value;
        int num = value ? 1 : 0;
      }
    }

    public Type(string PartType, bool FrontBack, bool LeftRight)
    {
      this.FrontLeftPoints = new List<PartPoint>();
      this.FrontRightPoints = new List<PartPoint>();
      this.BackLeftPoints = new List<PartPoint>();
      this.BackRightPoints = new List<PartPoint>();
      this.PartType = PartType;
      this.FrontBack = FrontBack;
      this.LeftRight = LeftRight;
    }

    public void UpdateType()
    {
      foreach (PartPoint partPoint in this.FrontLeftPoints)
        partPoint.UpdatePartPoint();
      foreach (PartPoint partPoint in this.BackLeftPoints)
        partPoint.UpdatePartPoint();
      foreach (PartPoint partPoint in this.FrontRightPoints)
        partPoint.UpdatePartPoint();
      foreach (PartPoint partPoint in this.BackRightPoints)
        partPoint.UpdatePartPoint();
    }

    public void DriveType()
    {
      foreach (PartPoint partPoint in this.FrontLeftPoints)
        partPoint.DrivePoint();
      foreach (PartPoint partPoint in this.BackLeftPoints)
        partPoint.DrivePoint();
      foreach (PartPoint partPoint in this.FrontRightPoints)
        partPoint.DrivePoint();
      foreach (PartPoint partPoint in this.BackRightPoints)
        partPoint.DrivePoint();
    }
  }
}
